{{extend "head.html"}}

{{block content}}

<div class="row">
 <div class="span4 well">
    <ul id="site" class="ztree"></ul>
 </div>

  <div class="span6 well">

	{{block category_content}}
	<div class="tabbable "> <!-- Only required for left/right tabs -->
	  <ul class="nav nav-tabs">
   	 <li class="active"><a href="#catetab1" data-toggle="tab">内容列表</a></li>
    	 <li><a href="#catetab2" data-toggle="tab">添加内容</a></li>
  	 </ul>
  	<div class="tab-content">
    	<div class="tab-pane active" id="catetab1">
	<table class="table table-condensed">
        <thead>
                <tr>
                <td>序号</td>
                <td>标题</td>
                <td>#</td>
                <td>#</td>
                </tr>
        </thead>
        <tbody>
        {{for n in cate_list:}}
        <tr>
                <td><input class="input-mini" type="text" placeholder=".input-mini" value={{=n.id_order}}></td>
                <td>{{=n.title}}</td>
                <td><a href="/admin/content_edit/{{=n.id}}">编辑</a></td>
                <td><a href="/admin/content_del/{{=n.id}}">删除</a></td>
        </tr>
        {{pass}}
        </tbody>
        </table>

    	</div>
    	<div class="tab-pane" id="catetab2">
		{{<<content_form}}
	    </div>
  	</div>
	</div>


	{{end}}
    </div>

</div> <!--row-->

{{end}}
{{block js_script}}

    {{include "inc_xheditor_plugins.html"}}
    <script type="text/javascript">
    $(function(){
    $('textarea').xheditor({
    tools:'Cut,Copy,Paste,Pastetext,|,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,|,Align,List,Outdent,Indent,|,Link,Unlink,Anchor,Img,Flash,Hr,Emot,Table,Code,Quote,|,About',
    skin:'default',
    upFlashExt:"swf",
    plugins:plugins,
    height:300,
    width:600,
    });
    });
    </script>
<SCRIPT LANGUAGE="JavaScript">
    var setting = {
            data:{
                simpleData:{
                    enable:true,
                    idKey:'id',
                    pIdKey:'pId'
                    }
                },
            async:{
                enable:true,
                url:"/getdatatree"
                }
    };

    $(document).ready(function(){
        $.fn.zTree.init($("#site"), setting);
    });

</SCRIPT>


{{end}}







